import {
  HydrogenLeakageStatisticsConditionDto,
  HydrogenLeakageDynamoStatisticsResultDto
} from './model/yzhModel';

import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';

enum Api {
  StatisticsHydrogenLeakage = '/demo/yzh/hydrogen',
}

/**
 * @description: 漏氢率统计
 */
export function statisticsHydrogenLeakage(params: HydrogenLeakageStatisticsConditionDto, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<HydrogenLeakageDynamoStatisticsResultDto>(
    {
      url: Api.StatisticsHydrogenLeakage,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}